﻿/*
 * Created by SharpDevelop.
 * User: ratul
 * Date: 3/5/2010
 * Time: 2:31 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;

namespace H264Impl.NET.NAL.NonVCLNALUnit
{
	/// <summary>
	/// Description of subsetSequenceParameterSet.
	/// </summary>
	public class SubsetSequenceParameterSetNonVCLNALUnit : SequenceParameterSetNonVCLNALUnit
	{
		public SubsetSequenceParameterSetNonVCLNALUnit(BitStream _NALUnitBitStream, bool forbiddenZeroBit, UInt32 _NALRefID) : base(_NALUnitBitStream, forbiddenZeroBit, _NALRefID)
		{
			parseRBSP();
		}
				
		private void parseRBSP()
		{
			base.parseRBSP();
			if( profileIDC == 83 || profileIDC == 86 ) {
				seqParameterSetSvcExtension( );            /* specified in Annex G */
			svcVuiParametersPresentFlag = RBSP.getBit();
			if( svcVuiParametersPresentFlag == true )
				svcVuiParametersExtension( );               /* specified in Annex G */
			} else if( profileIDC == 118 ) {
				bitEqualToOne = RBSP.getBit();
				seqParameterSetMvcExtension( ); /* specified in Annex H */
				mvcVuiParametersPresentFlag = RBSP.getBit();
				if( mvcVuiParametersPresentFlag == true )
					mvcVuiParametersExtension( ); /* specified in Annex H */
			}
			additionalExtension2Flag = RBSP.getBit();
			if( additionalExtension2Flag == true )
				while( moreRbspData( ) )
					additionalExtension2DataFlag = RBSP.getBit();
			rbspTrailingBits( );
		}
		
		
		void seqParameterSetSvcExtension()
		{
			
		}
		
		void svcVuiParametersExtension()
		{
			
		}
		
		void seqParameterSetMvcExtension()
		{
			
		}
		
		void mvcVuiParametersExtension()
		{
			
		}
		
		void rbspTrailingBits()
		{
			
		}
		
		bool moreRbspData()
		{
			return false;
		}
		
		bool svcVuiParametersPresentFlag;
		bool bitEqualToOne;
		bool mvcVuiParametersPresentFlag;
		bool additionalExtension2Flag;
		bool additionalExtension2DataFlag;
		
		
	}
}
